package com.sprouting.ops.model;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.sprouting.ops.annotations.invoke.CheckIsNullOrEmpty;
import com.sprouting.ops.annotations.invoke.CheckNotNull;
import com.sprouting.ops.interfaces.AddGroup;
import com.sprouting.ops.interfaces.UpdGroup;
import lombok.Data;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableId;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;

/**
 * 场所项目时间轴(OpsSiteTimeLine)(OPS_SITE_TIME_LINE) 表实体类
 *
 * @author ：lx（长沙麓谷）
 * @date 创建时间：2025-08-20 21:41:14
 */
@Data
@TableName("ops_site_time_line")
public class OpsSiteTimeLine extends BaseModel {

    /**
     * 主键
     */
    @CheckNotNull(message = "非法ID", groups = UpdGroup.class)
    @CheckIsNullOrEmpty(message = "无效ID", groups = AddGroup.class)
    @TableId
    private String id;
    /**
     * 场所id
     * @see OpsSite#getId()
     */
    @CheckNotNull(message = "请选择所属现场")
    private String siteId;
    /**
     * 发生时间
     */
    @NotNull(message = "请选择发生事件")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern="yyyy-MM-dd", timezone = "GMT+8")
    private Date triggerTime;
    /**
     * 事件
     */
    @CheckNotNull(message = "请输入事件")
    private String event;
    /**
     * 等级
     * @see com.sprouting.ops.interfaces.ConstantBase.TimeLineLevel
     */
    private Integer level;

}
